using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ChooseClothes : MonoBehaviour
{
    public GameObject[] select;//代表所有选中控件
    public int count;//代表当前选中的服装
    Image image;//主人公图组件
    void Start()
    {
        select[VariableDocument.GetInstance.figure_of_characters].SetActive(true);
    }

    //点击服装button的事件
    public void ChangeClothes()
    {
        //Debug.Log(message: VariableDocument._instance.isChangeClothes);
        //if (VariableDocument.GetInstance.isChangeClothes)
        //{
            for (int i = 0; i < 9; i++)
            {
                select[i].SetActive(false);
            }
        //}
        VariableDocument.GetInstance.isChangeClothes = true;
        select[count].SetActive(true);
        image = GameObject.Find("人物").GetComponent<Image>();
        image.sprite = Resources.Load<Sprite>(VariableDocument.GetInstance.clothes[count]);
        //选择衣服后，保存衣服前
        VariableDocument.GetInstance.num = count;
        Debug.Log(VariableDocument.GetInstance.pr_characters + ",   " + VariableDocument.GetInstance.ppr);
   
    }



}
